<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Administration Page</title>
<!--<script type="text/javascript" src="http://code.jquery.com/jquery-latest.js"></script> -->
<script type="text/javascript" src="<?php echo base_url(); ?>assets/js/jquery-1.3.2.js"></script>
<script type="text/javascript" src="<?php echo base_url(); ?>assets/js/thickbox.js"></script>
<script type="text/javascript" src="<?php echo base_url(); ?>assets/js/jquery.tablesorter.min.js"></script>
<script type="text/javascript" src="<?php echo base_url(); ?>assets/js/jquery.validate.js"></script>
<script type="text/javascript" src="<?php echo base_url(); ?>assets/js/menu.js"></script>
<script>
function submitbutton(pressbutton) 
{
	if (pressbutton=="cancel")
	{
		location.href="<?php echo base_url().index_page(); ?>/adminpage/cpanel/";
	}
	else
	{
		if (checkvalidate())
		{
			submitform(pressbutton);
		}
		else
		{
			return 0;
		}
	}
}
function submitform(pressbutton)
{
	if (pressbutton) 
	{
		document.adminForm.task.value=pressbutton;
	}
	if (typeof document.adminForm.onsubmit == "function") 
	{
		document.adminForm.onsubmit();
	}
	document.adminForm.submit();
}

</script>
<style type="text/css">
<!--	
	@import url('<?php echo base_url(); ?>assets/css/admin/master.css');
	@import url('<?php echo base_url(); ?>assets/css/admin/menu.css');
	@import url('<?php echo base_url(); ?>assets/css/admin/style.css');
	@import url('<?php echo base_url(); ?>assets/css/admin/thickbox.css');
-->
</style>
<style type="text/css">
<!--
#sponsorAdDiv {position:absolute; height:1; width:1px; top:0; left:0;}
-->
</style>
<?php
if($this->session->flashdata('message')!='')
{ 
?>
<script type="text/javascript">

/******************************************
* DHTML Ad Box (By Matt Gabbert at http://www.nolag.com)
* Visit http://www.dynamicdrive.com/ for full script
* This notice must stay intact for use
******************************************/

adTime=5;  // seconds ad reminder is shown
chanceAd=1; // ad will be shown 1 in X times (put 1 for everytime)

var ns=(document.layers);
var ie=(document.all);
var w3=(document.getElementById && !ie);
var calunit=ns? "" : "px"
adCount=0;
function initAd(){
	if(!ns && !ie && !w3) return;
	if(ie)		adDiv=eval('document.all.sponsorAdDiv.style');
	else if(ns)	adDiv=eval('document.layers["sponsorAdDiv"]');
	else if(w3)	adDiv=eval('document.getElementById("sponsorAdDiv").style');
	randAd=Math.ceil(Math.random()*chanceAd);
        if (ie||w3)
        adDiv.visibility="visible";
        else
        adDiv.visibility ="show";
	if(randAd==1) showAd();
}
function showAd()
{
	if(adCount<adTime*5)
	{
		adCount+=1;
		if (ie)
		{
			documentWidth  =truebody().offsetWidth/2+truebody().scrollLeft-20;
			documentHeight =truebody().offsetHeight+truebody().scrollTop + 30;
		}	
		else if (ns)
		{
			documentWidth=window.innerWidth/2+window.pageXOffset-20;
			documentHeight=window.innerHeight+window.pageYOffset + 30;
		} 
		else if (w3)
		{
			documentWidth=self.innerWidth/2+window.pageXOffset-20;
			documentHeight=self.innerHeight+window.pageYOffset + 30;
		} 
		adDiv.left=documentWidth-250+calunit;
		adDiv.top =documentHeight-610+calunit;
		setTimeout("showAd()",100);
	}
	else 
		closeAd();
}
function closeAd(){
if (ie||w3)
adDiv.display="none";
else
adDiv.visibility ="hide";
}

function truebody(){
return (document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body
}

onload=initAd;
//End-->
</script>
<?php
}
?>

</head>
<?php
	/*if ($this->session->userdata('logged_in_status')==false)
	{
		redirect(base_url().index_page().'/admin/');
	}*/
	if ($_SESSION['logged_in_status']==0)
	{
		redirect(base_url().index_page().'/admin/');
	}

?>
<body>

<div id="container">
    <div id="header">
    	 <div id="disclaimer"><?php echo $this->lang->line('welcome'); ?> ADMIN | <a href="<?php echo base_url().index_page(); ?>/adminpage/cpanel/changepassword/" title="<?php echo $this->lang->line('changepass'); ?>"><?php echo $this->lang->line('changepass'); ?></a> | <a href="<?php echo base_url().index_page(); ?>/admin/logout" title="<?php echo $this->lang->line('logout'); ?>"><?php echo $this->lang->line('logout'); ?></a></div>
        <ul class="topnav">
            <li><a href="<?php echo base_url().index_page().'/adminpage/cpanel/'; ?>">Home</a></li>
            <li>
                <a href="#">Website</a>
                <ul class="subnav">
				
				<li><a href="<?php echo base_url().index_page(); ?>/adminpage/cpanel/newsletter/">Newsletter</a></li>
				<li><a href="<?php echo base_url().index_page(); ?>/adminpage/cpanel/globalconfig/" >Global Config</a></li>
					<li><a href="<?php echo base_url().index_page(); ?>/adminpage/cpanel/changepassword/" title="<?php echo $this->lang->line('changepass'); ?>"><?php echo $this->lang->line('changepass'); ?></a></li>
                    <li><a href="<?php echo base_url().index_page(); ?>/admin/logout" title="<?php echo $this->lang->line('logout'); ?>"><?php echo $this->lang->line('logout'); ?></a></li>
                </ul>
				
            </li>
			<li>
                <a href="<?php echo base_url().index_page(); ?>/adminpage/cpanel/user_manager/">User Manager</a>
            </li>
			<li>
                <a href="<?php echo base_url().index_page(); ?>/adminpage/cpanel/letter_manager/">Letter Manager</a>
            </li>
			
            <li>
              <a href="<?php echo base_url().index_page(); ?>/adminpage/cpanel/article_manager/">Article Manager</a>
            </li>
			<li>
				<a href="#">Information Manager</a>
                <ul class="subnav">
				<li><a href="<?php echo base_url().index_page(); ?>/adminpage/cpanel/reviews_manager/">Reviews Manager</a></li>
				<li><a href="<?php echo base_url().index_page(); ?>/adminpage/cpanel/vin_manager/">Vin Manager</a></li>
                </ul>
            </li>
			<li><a href="<?php echo base_url(); ?>" target="_blank">Live website</a></li>
        </ul>
    </div>
	<div id="page">
		<div class="padding">
<?php if ($icon!="" && $title!="")		
{
?>
			<div id="toolbox">
				<div id="topp"></div>
				<div id="mid">
					<div id="wrapp">
			 		<img src="<?php echo base_url(); ?>assets/img/<?php echo $icon; ?>" align='absmiddle'/><span class="title"><?php echo $title; ?></span>
					</div>
				</div>
				<div id="bott"></div>
			</div>
<?php } ?>			
			<div id="toolbox">
				<div id="topp"></div>
				<div id="mid">
                <div id="wrapp">
	 				<?php echo $content; ?>
				</div>
                </div>
				<div id="bott"></div>
			</div>
	 	</div>
	</div>
			<div align="center" style="padding-top:10px; padding-bottom:10px; display:none">
			Power by DangKhoaWeb
			</div>
		<noscript>Warning! JavaScript must be enabled for proper operation of the Administrator.</noscript>
</div>
</body>
</html>
